/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	heyong 
 * 
 * <p>描   述  :   BasicInfoMent.java for com.pengtu.gsj.entity.jsbz    </p>
 * 
 * <p>最后修改 : $: 2017年7月31日-下午2:30:31 v 1.0.0	 win7   $ </p>
 * 
*/

package com.pengtu.gsj.entity.jsbz;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * BasicInfoMent
 * 技术保障-信息化管理-基础信息管理
 * 2017年7月31日 下午2:30:31
 * heyong
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_JS_BASICINFOMENT")
public class BasicInfoMent extends IdEntity {

	private static final long serialVersionUID = -473413229113073213L;
	
	private String fileName;			//文件名称
	private String fileNo;          	//文件编号
	private String reportTime;			//年份
	private Date checkTime;			    //检查时间
	private String checkResult;			//检查结果
	
	private String remark;				//备注
	private Double yearMark;			//年度得分（导出用）
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	public BasicInfoMent(){
		
	}
	
	public BasicInfoMent(String id , String fileName){
		this.id = id;
		this.fileName = fileName;
	}
	
	
	@Column(name = "FILENAME")
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	@Column(name = "FILENO")
	public String getFileNo() {
		return fileNo;
	}
	public void setFileNo(String fileNo) {
		this.fileNo = fileNo;
	}
	@Column(name = "REPORTTIME")
	public String getReportTime() {
		return reportTime;
	}
	public void setReportTime(String reportTime) {
		this.reportTime = reportTime;
	}
	@Column(name = "CHECKTIME")
	public Date getCheckTime() {
		return checkTime;
	}
	public void setCheckTime(Date checkTime) {
		this.checkTime = checkTime;
	}
	@Column(name = "CHECKRESULT")
	public String getCheckResult() {
		return checkResult;
	}
	public void setCheckResult(String checkResult) {
		this.checkResult = checkResult;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	@Transient
	public Double getYearMark() {
		return yearMark;
	}

	public void setYearMark(Double yearMark) {
		this.yearMark = yearMark;
	}
	
	
}
